/* eslint-disable */
// @ts-ignore
import request from '@/utils/request';
import { CustomRequestOptions } from '@/interceptors/request';

import * as API from './types';

/** 绑定小程序 POST /api/user/bindMnp */
export async function bindMnpUsingPost({
  body,
  options,
}: {
  body: API.bangdingweixinxiaochengxuhuogongzhonghao;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultobject>('/api/user/bindMnp', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 绑定手机 POST /api/user/bindMobile */
export async function bindMobileUsingPost({
  body,
  options,
}: {
  body: API.bangdingshoujicanshu;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultobject>('/api/user/bindMobile', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 绑定微信公众号 POST /api/user/bindOa */
export async function bindOaUsingPost({
  body,
  options,
}: {
  body: API.bangdingweixinxiaochengxuhuogongzhonghao;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultobject>('/api/user/bindOa', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 个人中心 GET /api/user/center */
export async function centerUsingGet({
  options,
}: {
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultgerenzhongxinVo>('/api/user/center', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 修改密码 POST /api/user/changePassword */
export async function changePasswordUsingPost({
  body,
  options,
}: {
  body: API.xiugaimimacanshu;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultobject>('/api/user/changePassword', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 忘记密码 POST /api/user/forgotPwd */
export async function forgotPwdUsingPost({
  body,
  options,
}: {
  body: API.wangjimimacanshu;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultobject>('/api/user/forgotPwd', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 微信手机号 POST /api/user/getMobileByMnp */
export async function mnpMobileUsingPost({
  body,
  options,
}: {
  body: API.weixinshoujicanshu;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultobject>('/api/user/getMobileByMnp', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 个人信息 GET /api/user/info */
export async function infoUsingGet({
  options,
}: {
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultgerenxinxiVo>('/api/user/info', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 重置密码 POST /api/user/resetPassword */
export async function resetPasswordUsingPost({
  body,
  options,
}: {
  body: API.xiugaimimacanshu;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultobject>('/api/user/resetPassword', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 编辑信息 POST /api/user/setInfo */
export async function setInfoUsingPost({
  body,
  options,
}: {
  body: API.yonghugengxincanshu;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultobject>('/api/user/setInfo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 更新新用户信息 POST /api/user/updateUser */
export async function updateDataUsingPost({
  body,
  options,
}: {
  body: API.xinyonghugengxinxinxicanshu;
  options?: CustomRequestOptions;
}) {
  return request<API.AjaxResultobject>('/api/user/updateUser', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
